<script setup>
import { ref } from 'vue';
import take  from '/subpkg/components/take.vue';
import mine  from '/subpkg/components/mine.vue';
const showIndex = ref(1);
const barList = ref([
	{
		title: '我要取件',
		Sicon: '/static/images/openS.png',
		icon: '/static/images/open.png',
		isSelect: 1
	},
	{
		title: '我的',
		Sicon: '/static/images/wodeS.png',
		icon: '/static/images/wode.png',
		isSelect: 2
	}
]);

function changePage(index) {
	showIndex.value = index + 1;
}
const props = defineProps(['cabinetId']);
</script>

<template>
	<view>
		<take :cabinetId="props.cabinetId" v-show="showIndex === 1"></take>
		<mine v-show="showIndex === 2"></mine>

		<custom-tab :barList="barList" :index="showIndex" @changePage="changePage"></custom-tab>
	</view>
</template>

<style lang="scss">
.happy-code-box {
	margin-right: 20rpx;
	border: 3rpx solid #cec5c5 !important;
}
</style>
